/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package nexus.criterios;

import control.UserBean;
import javax.faces.context.FacesContext;
import javax.faces.el.VariableResolver;
import java.util.*;
/**
 *
 * @author juampi
 */
public class ControlNota {
    public ArrayList<Calificacion> getCalificaciones(){
        return GestorCriteriosDB.getInstance().recuperarCalificaciones(getUsuario().getCodigoCurso(),getUsuario().getId());
    }
    public UserBean getUsuario(){
        FacesContext facesContext = FacesContext.getCurrentInstance();
        VariableResolver vr = facesContext.getApplication().getVariableResolver();
        UserBean user = (UserBean)vr.resolveVariable(facesContext, "userBean");
        return user;
    }
}
